package org.cloudie.docs.editor.client.content.contextmenus;

import org.cloudie.docs.editor.client.commands.generic.DesktopFullScreenCommand;
import org.cloudie.docs.editor.client.commands.generic.DialogFolderNewCommand;
import org.cloudie.docs.editor.client.commands.generic.DialogIconNewCommand;
import org.cloudie.docs.editor.client.commands.generic.DialogPreferencesCommand;
import org.cloudie.docs.editor.client.commands.generic.DialogWindowNewCommand;
import org.cloudie.docs.editor.client.resources.icons.IconsHelper;
import org.cloudie.docs.editor.client.widgets.ContextMenu;

public class DesktopContextMenu extends ContextMenu {

  protected static DesktopContextMenu instance;
  
  public static DesktopContextMenu get() {
    if (instance == null) {
      instance = new DesktopContextMenu();
    }
    return instance;
  }
	
  protected DesktopContextMenu() {
	addMenuItem(IconsHelper.icons.IconNew(), "Add new icon", new DialogIconNewCommand());
	addMenuItem(IconsHelper.icons.FolderNew(), "Add new folder", new DialogFolderNewCommand());
    addMenuItem(IconsHelper.icons.WindowNew(), "Add new window", new DialogWindowNewCommand());
    addSeparator();
    addMenuItem(IconsHelper.icons.FullScreen(), "Toggle full-screen", new DesktopFullScreenCommand());
    addSeparator();
    addMenuItem(IconsHelper.icons.Style(), "Desktop Preferences", new DialogPreferencesCommand());
  }
  
}
